unify the way to call callback function