refactor part 11