added synchronization of rectangle object creation
added synchronization of object movement