improved readability in switch statement