passing arguments in function using lists