single threaded version now working