move functions to be ordered by use