refactoring smart city central part