implements entity id lookup