refactoring - part 1