get rid of int_pos
Add -r to set rank dynamically