added support for external server