updated to use new sync api