first two phases