added licensing and comments