fixed hostname bug, updated test.js