trying different things to increase speed
try some more stopping heuristics
working and fast
merge