"cities and towns is a public function and the cities and towns therein" . . . . . . .