properly handle nulls
now returns a future to better manage its asynchronous operation
fixed issue with premature termination of the batch job