terminates if there is no metadata