created the function