threading experiments and more debug statements