handle arrays a bit better