changed test to support hosts other than localhost, variable name consistency.