refactoring method calcular always returns a hash