added accessor and a unittest for array