periodically checks for dead devices
refactor