Added helper functions for firebase