saving here just in case I break something
add support for suppressing debug messages; add support for thread-local state