made digraph use frequency map
moved exception handling to specific problem areas