Changed some queries in listar method and modified the update method