eliminates excessive console logs from for loop