add way manage and fix some bugs