refactoring final project