improve missing day identification script