Added dolist() function