gambler model complete with passing tests