added capacitor class and other functionality