Added loop for repeating process