working on preventing near duplicate lines