changes to fix Local and Global sizes bugs, and serial reduction added to verify confidence belt