I would like to create a merge sort example like this one on Wikipedia:Merge Sort. Can someone help me?

here is what I've done so far, but it doesn't work properly and effects are not like in this wikipedia example. Any improvement ? Thanks
\documentclass{beamer}
\usepackage{pgfpages}
\usepackage[ngerman]{babel}
\usepackage{animate}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathmorphing,through,backgrounds,positioning,fit,petri}
\usetikzlibrary{shapes,shadows}
\usetikzlibrary{shapes.multipart}
\usetikzlibrary{calc}
\usetikzlibrary{decorations.pathreplacing}
\newcounter{angle}
\setcounter{angle}{0}
\begin{document}
\begin{frame}
\begin{animateinline}[
begin={%
\begin{tikzpicture}
\node[shape=rectangle, draw=black, minimum size=0.5cm](1) at (1,1) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm](2) at (1.5,1) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm](3) at (2,1) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm](4) at (2.5,1) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm](5) at (3,1) {8};
\node[shape=rectangle, draw=black, minimum size=0.5cm](6) at (3.5,1) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm](7) at (4,1) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm](8) at (4.5,1) {4};
\node(9) at (5.0,1) {};
\useasboundingbox (-0.5,-0.5) rectangle (10,9.5);},
end={\end{tikzpicture}}
]{10}
\newframe*
\multiframe{2}{iCount=1+1}{
\node[shape=rectangle, draw=black, minimum size=0.5cm] (1) at (1,\iCount) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (2) at (1.5,\iCount) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (3) at (2,\iCount) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (4) at (2.5,\iCount) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (5) at (3.2,\iCount) {8};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (6) at (3.7,\iCount) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (7) at (4.2,\iCount) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (8) at (4.7,\iCount) {4};
}
\newframe*
\multiframe{2}{iCount=2+1}{
\node[shape=rectangle, draw=black, minimum size=0.5cm] (1) at (1,\iCount) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (2) at (1.5,\iCount) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (3) at (2.1,\iCount) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (4) at (2.6,\iCount) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (5) at (3.2,\iCount) {8};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (6) at (3.7,\iCount) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (7) at (4.3,\iCount) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (8) at (4.8,\iCount) {4};
}
\newframe*
\multiframe{2}{iCount=3+1}{
\node[shape=rectangle, draw=black, minimum size=0.5cm] (1) at (1,\iCount) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (2) at (1.5,\iCount) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (3) at (2.1,\iCount) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (4) at (2.6,\iCount) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (5) at (3.2,\iCount) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (6) at (3.7,\iCount) {8};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (7) at (4.3,\iCount) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (8) at (4.8,\iCount) {4};
}
\newframe*
\multiframe{2}{iCount=4+1}{
\node[shape=rectangle, draw=black, minimum size=0.5cm] (1) at (1,\iCount) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (2) at (1.5,\iCount) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (3) at (2.0,\iCount) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (4) at (2.5,\iCount) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (5) at (3.2,\iCount) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (6) at (3.7,\iCount) {4};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (7) at (4.2,\iCount) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (8) at (4.7,\iCount) {8};
}
\newframe*
\multiframe{2}{iCount=5+1}{
\node[shape=rectangle, draw=black, minimum size=0.5cm] (1) at (1,\iCount) {1};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (2) at (1.5,\iCount) {2};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (3) at (2.0,\iCount) {3};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (4) at (2.5,\iCount) {4};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (5) at (3.0,\iCount) {5};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (6) at (3.5,\iCount) {6};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (7) at (4.0,\iCount) {7};
\node[shape=rectangle, draw=black, minimum size=0.5cm] (8) at (4.5,\iCount) {8};
}
\end{animateinline}
\end{frame}
\end{document}
