authorizer function now called from correct scope