setPos and setColor function added to set position and color to existing object.