extended the line handling