working on script jig pseudo code