adds duplicate event function