Added a set_callback function and some comments