That's a lot of else-if statements. Perhaps to make the code easier to read through, you could instead use a switch/case block?