Changed appendContent to private function