failures and refactoring