Removed extraneous loop