modify for telnet and fpt