waves, working variant