refactoring js object model part 3