Modified the HomeViewModel.filter method