added support for different internal/external protocol schemes