Make private function really private; use this instead of r variable inside methods.