Added a callback function.