add optional manifold support
fix var names