Changed to take filter through input