trying to solve the phase detection problem, introduced allsignal3