actually working Array switch