Data checking script, but it's really slow