removed wexpect and refactored to use telnetlib