removed uneeded loop