refactor host into single var