added betting algorithm and transaction objects