added LICENCSE and ad
updated ad code