+1 refactor
small changes, update doc