before multiple threads version.