added support for localhost server