move config functions to end