result vector is called ids, not out