add cover function to account for non-connected nodes