Adds setReference public function to controller