created heirarchy of entity and fixed date pattern issue