added Austin's code for metadeta parsing