How an implantable loop recorder (ILR) works