re-order functions in source