added toggle for drawing mode.