Added comment to describe the purpose of the function