adding ssl layer - work in progress