simplify the iorder assignment and make includes first