add device counter and better real-time searching