Change array class to dictionary class