revised drawSketchpad function