Added dynamic programming script to remove overlaps