making a function