updated comments for the functions