added algorithm tests. added mergeSame algorithm