implement torroidal space