2 versions of constructor for MovingGraph