reversing order of metadata and next