modified drawOnMouseEvent to drawAndFill