added two types of ids, one for searching: id and one for removing duplicate states: uid