Updating code for phase