implement appendTo