added element.contents to the append function in compile phase