added a new variable to store the remaining item if kept on the list