before firebase