Re-ordering code