fixing the rank