changed to new implementation of drag and resize for the rectangle - all working