Added comments to each of the new functions