added fudged version of base/term.t