modified arrays file to automate iteration