test with null check done
duplicate check done