introduced hostgroup; fixed faulty paramter logic