def_rank correctly integrated