refactor all the option setting
wtf