improving addToList() method