adding in capacitor sensor code