socket and sketchpad functionality for changing pen width