fixing date iteration