modified DrawingPanel and UI classes