that logic wont work with multiple maxima and mini...
# troubleshooting
k
that logic wont work with multiple maxima and minima