us a "onstate" handler, instead of a root wildcard