minor refactor + update doc