accept randomstate object