more refactor and doCity()