refactor host-stats a bit