Threaded Implementation of Berkowitz Algorithm