Added dynamic rank changing