Refactoring Lotacoes and update in table lotacoes