small cfunction to samle from rbinom