making scripts stateful'