rand initialization tweaked