wip, need to implement rejectUnauthorized