create class MovingObject