need to be careful when mutating input arguments. passed "by ref" (ish) in python so would mutate for called as well