new calc_mode argument added

calc_mode definition