correct the way we write into firebase database