added untested support for non cubic cells