remove useless setting, and improve related function