added border extension functionality to func smooth2d