Bet function smartified