Added method to set the callback ar runtime.