fixed and trimmed drawingtask script