add comments rename some function for  review convinently