switch case removed internal for loops