added option for torus border rule