properly find ranks
allow 0 DDs remaining, other shiny changes