code refactoring; adding filter action to the home page