fixed some of the stuff in phase1