moved main comment out of function so start and end of for loop it was inside is now clearer