much improved ROH pruning algorithm. Thanks to @udp3f