first code to generate riemannian metrics...not tested