Incorporated comments by dheeraj
Changed const qualifier in insertrec