function of duplicate image prevention added