modified createDate method