adding parsing and finding of connected components