refactor tournament