deal with callback
add function