added filter functionality.