added support for reversing axes