setting up the function