added line number detection