use parallel patterns library to manage threaded tasks