further revision and work on file shftex.f