TODO: fix line removing