updated code for dup checking (VBAT-65)