appendChild method calls should be appendNode