update data and add private function as well as fix headers