made peaks into an array