little change to lottery related code