make sure that $this->userId is initialized before using it as a parameter