Sepparated the create list function; code comments