implemented basic step motion and fixed some errors with the diatonic step motion function