You can define list as a parameter instead to clean it up