add doc
refactoring