updates from phase2 branch