updated rand to have larger buffer and uint64 support