added tests
pulling from upstream