processLine method