Modified switch generation so that only the phi values associated with the