new function for adding an item to a list