phase 2 finished, refactor left