change wave junction algorithm