add logic of options