minor fix: generate random in [0,1] instead of [0,1)