implemented a read loop in sensor classes