WORKING firebase code with new style