edited ads controller for selecting ads through categories