commented on cpp functions