implement betting functionality