added config file; bug fixed