more general use of stateparams