Added function for finding chains.

So we can find a good chain for plotting.