works with firebase