added naive union find algorithm and client code that allows manual testing