adding the south dragging for resizing, cleaning up code