reorganize lines