fixes #7, requireConfig as function, add test