reorder backend matrix