some support for different dimensionality
Merge https://github.com/RedSunAtNight/OddsNEnds