threaded working now. not fast enough yet