manifold working! with cosine!