added filtering functionality for media index