Connected Components Code