wokring with firebase