Using switch instead of multiply if-else statements.