included more pseudo code for oauth