more efficient sketchpad creation code