Created function to pass location to firebase