adds logic to catch bad patterns
0.2.0