add #parties and #party(id) code