logic done mostly except group stage rank