Refactor part1