added linked list for R-peak storage and handling