added voltage handling