took qe out of for loop