changed callback to terminate if it returns True. More doco.