added some more cases where value could be an array