adding original code

(waiting on permission from author of the oauth script)