implement addElement