moved checking if all the fields have been visited to a lambda in closeTrail()