in rectangleFactory, 1st argument of setMovementParameters can not be an object