move functions to config module