created the box to rows method