Got rid of loop