change generic variable output to T, remove "throw Exception", remove
method visit(TermedDocument document)