Created addElement() method