seperate RectangleWithHoles to DifferentiableFunction implementation