Renamed ctx to exch.