added ability to find hostname via js