added commenting to callback functions