added greedy thick thinning