switch topic var to optional