add new post union find algorithm