sampling from upper bound