more function orderingcleanup