added firebase functionality