work on termcapped reading