fixing sign issues, argmin