check how the callback should be invoked