more work on entity scanning