updated peaks routine