collected ssl handler into a method