some reordering to make example nicer