Changes to compute peak