neater switch statement