check if voltage is negative, and change it to positive in that case.