index needs to be offset by 2

since maxindex excludes the first 2 data points ie.,[3:length(h$density)]  i believe this needs to be offset by 2 in the next step.