call peak modified to use minimze scalar
fixed merge conflicts