Can we make this a switch or at least al if/else if chain?