some code refactoring, match service added