started with writing more complex pattern match heuristics