passing arguments in function with variables