re-arrange the static functions.