improve addElement syntax