multithreaded version (experimental); updated to latest libs