edited retrieval for filter data in controller