added support for non-symmetric cavities