altered to handle new requests versions and external oauth lib