how they work sensors