added SCHEME option to specify http or https