defining the function