working bet creation and update