re-order functions