add register callback function