Added latest changes, find peaks, find intersections