fixing up scoreDuplicates so it can be called more than once