improve mapping of entities