removing redundant max_threads variable