metadata parsing almost working