refactored end user sketch to be friedlier following review with anish