Polynomial Invariants for Bered 3-manifolds and Teichm Uller Geodesics for Foliations