fixed the voltage divider code