add some callback functions.