solved all Array-2 problems