Added defense from incorrect record type. Added invisible variables they are: timeFractArr and powOnTimeArr. Still there are problems in this place: times[0] =timeArray[0];