updated filter controller and view to access db