Beginning of project 3: function to add a new key/value pair to an index.