the code I used to do daily check