sketch of functions for using firebase