refactored moveShapeLeft and moveShapeRight