now testing importance sampling
merged with upstream