add peak point logic