firebase two way sync implemented