seed random
cast int32 variables to uint64 for consistency between platforms