added a check for array of ids and sends back results for all ids