what about putting those cases into methods to make the code more readable?