added testing stub
rewrote diff-ing algorythm