How to edit a list based on users input