checking date, working finlly