finish implementing ~/public/js/views/bet.js