adding stem function for ssl connection