test this function to see how it works.