bug with last commit: should no longer trim off last char in handshake line