Added new function which handles ent.