added sync feature to backend