Took out a variable and made function to parameters and arguments