Renamed randid to id