verify city in function test and change some code