add some comments and reorganize, improve status