finished building the processor thread function