general refactor, use threading macros