max duplication was removed. logging wrong results was added.