refactored doc