Added comments

Added comments in the functions