added function to reindex list

new function to reindex list synchronizes any changes made to values in
the list after the list was initiated
oops, bug array index bug fix
Merge branch 'pr/246'

* pr/246:
  add function to reindex list