added ajax and betting