working switching between wave