lines_organize function finished, tested with fsv fmt, to be tested more cases.