Implemented merger between 3 chains and 2 chains and orphan
still need to test