xDate function added