Made use of switch statements.

oh boy