Add ag and update for z