reorder functions to improve locality of reference