Included lottery generation logic