Adding a process(config) function, so the script can be used as a module