Working add to list function