created model class for bairro and refactored code to use it