update doc tests, add docstring for applySchema