Made the filter dynamic