define named function with 3 parameters