add conditional to make sure that the wave side to side motion is greater than one eighth the total distance from shoulder to shoulder for each motion to register, eventually constituting a wave