cast to array in case