changed the loop back to 1