implemented SSL and rescripted a few things to match the protocol