added metadata parsing