unlink event function