Created a function