move logic of iteration through phase instance into instance