refactor part 2