pass config object in directly