add sync support and tests