start of ad code