working (according to tests) version of del empty section