min voltage logic added.