change type of hostGroups to Object (Map)