added lineutils test and fixed some bugs in lineutils