Change array loops

Change array loops