changing Visibility protocol to StatusCode protocol