callback is not mandatory and add some protection for error handling