reject uses filter instead of repeating code.