change tolerance to line_tolerance, add area_tolerance