added function to filter in View