asigning ads to procedures