refactor controller , unused unpair latch