add generate sketch code