what is this code supposed to do ? 

stop adding elements if more than 1000 projects ? doesn't that break logic ?