wasting excessive time refactoring code