New function and config

New function
Config
Fix bug