updating arrays