use/respect hosts field

fixes #1