added tests and added license