Added support for results in the callback of each functions