Code written but duplication is not happening