refactor part 4
refactor part 5