merge from phase2 branch