add torus functionality