added addentity method