Added comments to clarify the function #258