phase 2and 1

established phase 2 code and some of 1