handle arrays better