added wave generation