Update sdk to use callbacks