This function needs a comment to explain what it does and why.