refactored code to make it more RESTful, cityname now being saved