refactors place bet button code