How to assign values to options and do the calculation result?