finished firebase backend