finished get option value function