added code and license