working on firebase functionality