Changed the code to use the updated ad module