late night refactoring