added license, added some tests