add comments and some modification