How does an RTD work