minimizing variables