added Pair case to alg W, and test parse