creating a function