switching to array