Added bet function