Quantifying explainable discrimination and removing illegal discrimination in automated decision making