make wave algo