globals and processing thread added