merge with TR's commit on BetBrain