print every 1000 elements