move randomid to method scope; drop unused member vars