update option function