unconnected graph cheking added, need tests