Comments added

Explanation of both functions added