trying to fix find rank