refactor to filter by 3 parameters for AL