Implementation of the rank check
Implementation of UnitTests