added the add-to-list functionality