Refactor part one