altered compare_lines api