Use switch instead of the jungle of conditionals (or a lookup table if you want).