fixed beginner's mistake: switch case without break