refactor -part 2