Refactor part 2