sometimes value is a list, sometimes not - handle that