worked on accessing array