succesfully queried db and output flights to json