added rank check: