new constructor for rand