change order of vars in wavetrack so that calculations work