match host function with more accuracy