Restored single threaded version. Should run on firefox