refactor to firebase
retrieves firebase data