added code to recognize downward motion as input for moving a piece down. This code is commented out since it is not reliable.