work on readArray method