add loop to check data