Rewrote the lost sensors() code