refactors pay place bet code