No data condition, and refactoring