added sync mechanism to bulk_upsert
tested sync method and found bug in bulk update