implement optimiztion with better scanning technique and 1-round case (prune unnecessary data)