rename testing functions to lose t
factor out statet stuff into general helper