create config.py and fix bug