Test the function