Added comments for the functions