optimized createSketchpad function