new version, can now handle higher rmax without survival exceeding 1