refactoring - part 2