added r.strip to for loop in linereader so \n doesn't mess with
expecteed == given