add date retriving functionality