solving a rebellious phase problem