added stateful testing; minor updates