format ordering code