redid code