improve access_token extract method