add comments for each function