doc+refactor