firebase factory