Added Callback functions and tests