added SSL and serializing
fixed merge