rank is generated correctly now