iteration order should be reversed for fortran order