allow 'names' to be undefined, default to an empty array