Creating a function