update_list function

Update list with input