changed dance to support multiple waveforms