expected is generated from rank