a bit of reordering