updated to use firebase