set up entity handler