added tests and license