WIP: sine wave rewrite