updated for node and Firebase