refactoring bet service