Added multi-threaded processing