replace rng.normal with rng.uniform
use unnamed value as shared_ptr is bad practice