added support for config files, closes #8