Changed the state for items to be a public function