added entity type flag on each record