change local variables to parameters