Generated a penTool function