added three-way binding with firebase