Write comments to describe the purpose of the following functions