improved twoArrays a bit