update program to support https connection