Added support for a passed in callable.