logging works for array