refactor part 2/2