change for to while loop to make more calls if projects cannot be accessed