added sync context support for callbacks