small edits to authorize function