removed extraneous loop call