added support for callables to state()