decomposed code
added code to save installation date
added code to set the index based on install date