module now requires passing config as a parameter