building skeleton of phases