removing uneeded loop