psuedocode for authorization check