changed the while loop condition to records !== 0
changed limit to 1000