updating go code to optional addition