finish all the func of log except for comments