random

...code from bitcore