Added function to clear list before running again