flipping template ordering, keeping extends on top