made timing for wavegeneration iteration rather than time based