lab 3 refactoring