Refactor pt1