can we add this code into a spacifi `WifiUI`class method?