use add() instead of [] notation

Update addMethodTemplate.

removeElement() is being used in the remover method, using add()
 in the adder is more consistent with the remover.