Fixing wrong merge that removed getDuplicates angluar function