diff --git a/arr.sml b/arr.sml
index eee23ab517990a653a8328e8126b211888a15cb3..7229a9a6e7e56531df43515ea042038ce0868a2f 100644
--- a/arr.sml
+++ b/arr.sml
@@ -50,6 +50,9 @@ (* TODO: do we only want this for boxed arrays?  do we want just tally for unboxed arrays? *)
 (* TODO: Do we want a boxed array to be length 1 or the length of the contents? *)
 fun shape (Bx(s,a)) = s
   | shape (Nd(x,y)) = Array([Word(tally(Nd(x,y)))]);
+(* change shape of boxed array *)
+fun reshape s (Bx(s,a)) = raise NYI
+  | reshape s a = reshape s (Box(a));
 (* print a string representation of an array *)
 fun str a = 
   let fun st Zl    = "(Zilde)" (* TODO: box-drawing characters might be nice in the future *)
@@ -60,6 +63,17 @@         | st (Lf(FD(x))) = "(Dyad)"
         | st (Nd(x,y))   = (st x) ^ " " ^ (st y)
         | st (Bx(s,a))   = "[" ^ (st a) ^ "]"
   in (st a) ^ "\n"
+  end;
+fun p2 (Bx(s,a)) =
+  let val l           = foldr (fn (x,y) => x*y) 0w1 (map (fn (Lf(N(x))) => x) (leaves a))
+      fun d n []      = []
+        | d 0 xs      = xs
+        | d n (x::xs) = d (n-1) xs
+      fun r _ []      = []
+        | r 0 xs      = []
+        | r n (x::xs) = x::(r (n-1) xs)
+        (* FIXME: finish implementing *)
+  in r 2 (leaves a)
   end;
 (* return a string representation of the internal structure of an array *)
 fun tree a =
