Updated callback functions