added function to match two reads