proper fix for merging values from groups, more concise host and group formatting