added code for processor and threads