added sine wave function for testing