Function reordering