change enum of direction_t and the switch directSum.