update
fix bugs
lottery base code