refactored when-no-rank. eliminated if statment.