added license, added logging