added functions for recording global state, tested in repl
added functions for handling seqable and number pre-conds