getting better. gotta work around TLS callback spaghetti