Converting if-else-if to idiomatic switch
Introducing a tiny buffer for experimental purposes