made config a parameter instead of reading 'modules.json'