refactoring matches management