With working realm storage
Added the sync logic