replaced cogent with custom https.request