switch case with array problem