updated exit to have a phase