added input of array rather than single id