update

add comment and modify some functions