removed unneeded loop