Consider a lookup table structure here rather than series of if - easier to grow if we gain more modes, possibly easier to read.