small ble refactoring to keep a single state