Refactor condicion