refactoring code on Friday