start using switch internally in Array