changed structure of view and initial of array