Converted about half (or more) of the rdm1 function ... that's the only remaining piece.